<template>
	<view>
		<view class="p-2">
			<u-tabs :list="list1" @click="click"></u-tabs>
		</view>
		<view class="p-2">
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :indicator-active-color="indicatorActiveColor" :indicator-color="indicatorColor"	 :autoplay="autoplay" :interval="interval"
				:duration="duration">
				<swiper-item>
					<image src="../../../static/imgs/home/banner1.png" class="swiper-item"></image>
				</swiper-item>
				<swiper-item>
					<image src="../../../static/imgs/home/banner2.png" class="swiper-item"></image>
				</swiper-item>
				<swiper-item>
					<image src="../../../static/imgs/home/banner3.png" class="swiper-item"></image>
				</swiper-item>
			</swiper>
		</view>
		<view class="p-2 flex justify-between items-center">
			<view class="flex justify-center items-center bg-white rounded-lg p-3 shadow-2xl">
				<view>-</view>
				<view class="flex flex-col justify-center items-center">
					<view>排行</view>
					<view>热播好剧</view>
				</view>
			</view>
			<view class="flex justify-center items-center bg-white	rounded-lg p-3 shadow-2xl">
				<view>-</view>
				<view class="flex flex-col justify-center items-center">
					<view>最新</view>
					<view>热播好剧</view>
				</view>
			</view>
			<view class="flex justify-center items-center bg-white p-3	rounded-lg shadow-2xl">
				<view>-</view>
				<view class="flex flex-col justify-center items-center">
					<view>剧情</view>
					<view>精彩内容</view>
				</view>
			</view>
		</view>
		<view class="video-list">
			<view class="video-item rounded-lg p-2" v-for="item in goods">
				<image :src="item.logo"></image>
				<view class="name flex">
					<u-tag v-for="tag in item.tags" :text="tag" class="mr-2" plain size="mini" type="warning"></u-tag>
					<text>{{item.name}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list1: [{
					name: '推荐',
				}],
				goods:[{
					name:'重生长话',
					tags:['推荐','最新'],
					logo:'https://cdn.uviewui.com/uview/album/1.jpg'
				},
				{
					name:'重生六六',
					tags:['推荐','热门'],
					logo:'https://cdn.uviewui.com/uview/album/2.jpg'
				},
				{
					name:'王妃侍从',
					tags:['推荐','火爆'],
					logo:'https://cdn.uviewui.com/uview/album/3.jpg'
				},
				{
					name:'指明镀液',
					tags:['推荐'],
					logo:'https://cdn.uviewui.com/uview/album/4.jpg'
				}
				],
				background: ['color1', 'color2', 'color3'],
				indicatorColor: '#FFFFFF',
				indicatorActiveColor: '#8A38F5',
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500
			};
		},
		 methods: {
			changeIndicatorDots(e) {
				this.indicatorDots = !this.indicatorDots
			},
			changeAutoplay(e) {
				this.autoplay = !this.autoplay
			},
			intervalChange(e) {
				this.interval = e.target.value
			},
			durationChange(e) {
				this.duration = e.target.value
			}
		}
	}
</script>

<style lang="scss">
.swiper{
	height: 360rpx;
}
.swiper-item{
	width: 100%;
	height: 360rpx;
}
.top-box{
	border-bottom: 2rpx solid #d9d9d9;
}
.video-list{
	padding: 0 15rpx;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	height: 100%;
	position: relative;
	padding-bottom: calc(var(--window-bottom) + 20px);
	.video-item{
		background: #fff;
		width: 355rpx;
		margin: 10rpx 0;
		//padding: 15rpx;
		box-sizing: border-box;
		image{
			width: 100%;
			height: 600rpx;
			display: block;
			margin: 5px auto;
		}
		.price{
			color: $main-color-auxiliary-five;
			font-size: 36rpx;
			text:nth-child(2){
				color: #ccc;
				font-size: 28rpx;
				margin-left: 17rpx;
				text-decoration: line-through;
			}
		}
		.name{
			font-size: 28rpx;
			line-height: 50rpx;
			padding-bottom: 15rpx;
			padding-top: 10rpx;
		}
	}
}
</style>
